package edu.washington.tcss360.burningpenguins.tests;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;

import edu.washington.tcss360.burningpenguins.data.DataObject;
import edu.washington.tcss360.burningpenguins.data.Recommendation;

public class RecommendationTest 
{

	/** A permission object to use in tests */
	private DataObject my_recommendation;
	
	/** Sets up the data object for tests. */
	@Before
	public void setUp()  
	{
		my_recommendation = new Recommendation();
	}

	/** Test setting and getting ID. */
	@Test
	public void testGetId() 
	{
		my_recommendation.setId(3);
		assertSame("Incorrect Id", my_recommendation.getId(), 3);
	}

	/** Test setting and getting UserID. */
	@Test
	public void testGetUserId() 
	{
		((Recommendation) my_recommendation).setUserId(3);
		assertSame("Incorrect Id", ((Recommendation) my_recommendation).getUserId(), 3);
	}

	/** Test setting and getting PaperID. */
	@Test
	public void testGetPaperId() 
	{
		((Recommendation) my_recommendation).setPaperId(3);
		assertSame("Incorrect Id", ((Recommendation) my_recommendation).getPaperId(), 3);
	}

	/** Test setting and getting RecommendationRating. */
	@Test
	public void testGetRecommendationRating() 
	{
		((Recommendation) my_recommendation).setRecommendationRating(3);
		assertSame("Incorrect Id", ((Recommendation) my_recommendation).getRecommendationRating(), 3);
	}
	
	/** Test setting and getting RecommendationComments. */
	@Test
	public void testGetRecommendationComments()
	{
		((Recommendation) my_recommendation).setRecommendationComments("test");
		assertSame("Incorrect Id", ((Recommendation) my_recommendation).setRecommendationComments(), "test");
	}

}
